package com.company;

public class Test15比较大小 {
    public static void main(String[] args) {
        System.out.println(compare(8,2,3));
    }

    /**
     * 比较大小
     * @param x
     * @param y
     * @param z
     * @return
     */
    public static int compare(int x,int y,int z){
        int tmp=0;
        if(x>y){
            tmp = x;
            x=y;
            y=tmp;
            if(x>z){
                tmp = x;
                x=z;
                z=tmp;
            }
        }
        return z;
    }
}
